package com.example.designPattern.Prototype;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class ShallowClone implements Cloneable {
    private String name;//名字
    private String moblie; //手机号码

    private List<String> list = new ArrayList<>();


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMoblie() {
        return moblie;
    }

    public void setMoblie(String moblie) {
        this.moblie = moblie;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(String str) {
        this.list.add(str);
    }

    public ShallowClone() {
    }

    public ShallowClone(String name, String moblie, List<String> list) {
        this.name = name;
        this.moblie = moblie;
        this.list = list;
    }

    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
